Some magnetic speed sensors are configured to measure the speed of a magnetic tooth wheel. Such speed sensors typically include an integrated circuit with a plurality of magnetic sensor elements, such as Hall sensor elements or xMR sensor elements (e.g., GMR—giant magneto resistance; AMR—anisotropic magneto resistance; TMR—tunnel magneto resistance; CMR—colossal magneto resistance). A permanent magnet provides a bias magnetic field to the sensor elements. As the wheel is rotated, the teeth of the wheel pass in front of the sensor and generate a small field variation, which is detected by the integrated circuit. The detected field contains information about the angular position and rotational speed of the wheel. Another type of magnetic sensor is a magnetic switch (e.g., a Hall switch), which can be used, for example, in a folding mobile phone to determine if the mobile phone is open or closed.
It is desirable to be able to test magnetic sensors to help ensure that the sensors are operating properly. One method for testing a magnetic sensor is to use an external magnetic core to apply test magnetic fields to the sensor, and measure the sensor response. In addition to the expense of the external equipment, another problem with using such an external magnetic field source is that there must be a precise alignment between the magnetic core and the sensor under test. Position errors can result in inaccurate test results.